package com.controller;

import org.springframework.stereotype.Controller;
import org.springframework.stereotype.Repository;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@Controller
public class ProdoutController {
//    @RequestMapping("/getPro")
//    public void getProducts(String[] proid){
//        for (String pro:proid){
//            System.out.println("获取到id为:"+pro+"的商品");
//        }
//    }
@RequestMapping("/getPro")
public void getProducts(@RequestParam("proid")List<String> proid){
    for (String pro:proid){
        System.out.println("获取到id为:"+pro+"的商品");
    }
}
}
